  <%require 'htmlentities'
  coder = HTMLEntities.new
  %>

                <div class="dashboard-saved-ads">
                	<div class="dashboard-my-info-header">
                      <%=image_tag("saved.png", :border=>"0px",:height=>"20") -%>
                    	<div class="dashboard-my-info-header-text">
                        	Saved Ads&nbsp;&nbsp;
                        </div>
                    </div>
                    <div class="dashboard-saved-ads-container">
                        <% @saved_advertisments.each do |saved_ads| -%>
                        <% @ad = Advertisment.find_by_id(saved_ads.advertisment_id)%>
                        <%@subcategory_id=@ad.sub_category_id -%>
                        <%@subcategory_name=SubCategory.find(@subcategory_id).name -%>
                        <%@category_id=SubCategory.find(@subcategory_id).category_id-%>
                        <%@category_name=Category.find(@category_id).name -%>

         <br>

                	<div class="dashboard-recent-resposes">
                        	<div class="dashboard-response-ad">
                              <%=link_to h(coder.decode(@ad.title.capitalize)), { :controller=> "advertisments" , :action=>"show" ,:id => @ad} -%>
                            </div>
                            <div class="dashboard-response-no">
                            	<a href="">Delete</a>
                            </div>
                            <div class="dashboard-posted-on">
                            	<%=@category_name-%> / <%=@subcategory_name-%>
                            </div>
                            <div class="dashboard-saved-in">
                            	Saved in: <%=saved_ads.folder -%>
                            </div>
                        </div>
                        <div class="parting-line">
                        	<hr/>
                        </div>

                      <%end -%>
                    </div>
                </div>